home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
mint
/
lib
/
mntlib44.zoo
/
mntlib
/
strpbrk.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-09-17
|
472b
|
23 lines
/* from Henry Spencer's stringlib */
#include <string.h>
/*
* strpbrk - find first occurrence of any char from breakat in s
*/
char * /* found char, or NULL if none */
strpbrk(s, breakat)
const char *s;
const char *breakat;
{
register const char *sscan;
register const char *bscan;
for (sscan = s; *sscan != '\0'; sscan++) {
for (bscan = breakat; *bscan != '\0';) /* ++ moved down. */
if (*sscan == *bscan++)
return((char *)sscan);
}
return(NULL);
}